const express = require("express");

const app = express();

// app.use(require("cors")());
app.use(express.json());
//静态托管
app.use("/uploads", express.static(__dirname + "/uploads"));
app.use("/uploads", express.static(__dirname + "/article"));
//密钥
app.set('secret','jinitaimei')
//链接数据库
require("./plugin/db")(app);
//新建分类
require("./router/admin/admin")(app);

app.listen(8090, () => {
  console.log("服务器启动成功");
});
